<div class="bjui-pageHeader">
    <div class="pull-right">
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('pro_pro')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
       <!--  <div class="bjui-searchBar">
            <label>名称:</label>
            <input type="text" name="name" value="{:I('name')}" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div> -->
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th width="150">货号</th>
            <th width="250">规格</th>
            <th width="50">库存</th>
            <th width="50">价格</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr data-id="{$vo.id}">
            <td width="26"><input type="checkbox"  class="checkboxCtrl" name="ids" data-toggle="icheck" value="{$vo.id}"></td>
            <td>{$vo.products_no}</td>
            <td >{:spec_detail($vo['goods_id'],$vo['spec_array'])}</td>
            <td class="prolist"><input type="text" value="{$vo.store_nums}" data-type="store_nums"/></td>
            <td class="prolist"><input type="text" value="{$vo.sell_price}" data-type="sell_price"/></td>
            <td></td>
        </tr>
        </volist>
        </tbody>
    </table>
</div>
<script>
    $(function () {
        $('.prolist input[type=text]').keyup(function () {
            var v = $(this).val(),
                    type = $(this).attr('data-type'),
                    pid = $(this).parents('tr').attr('data-id');
           $(this).bjuiajax('doAjax', {
              url:'{:U("Forms/sort_product")}',
               type:'post',
               data:{val: v, id : pid,type:type},
               loadingmask:false,
               callback:function (json) {
                   if (json[BJUI.keys.statusCode] != BJUI.keys.statusCode){
                        $(this).bjuiajax('ajaxDone', json);
                   }
                   return false;
               }
           });
        });
    });

</script>
<include file="Common/footer" ftype="page" />